package com.zqxx.examine.management.security;

import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import com.zqxx.examine.common.utils.MenuItem;
import com.zqxx.examine.model.user.Role;

public class UserInfo
  extends User
{
  private static final long serialVersionUID = 1L;
  private int userid;
  private List<Role> roleList;
  private String trueName;
  private String rolesName;
  private String enabled;
  private int fieldId;
  private String fieldName;
  private String email;
  private Date lastLoginTime;
  private Date loginTime;
  private LinkedHashMap<String, MenuItem> menuMap;
  private HashMap<String, Role> roleMap;
  
  public HashMap<String, Role> getRoleMap()
  {
    return this.roleMap;
  }
  
  public void setRoleMap(HashMap<String, Role> roleMap)
  {
    this.roleMap = roleMap;
  }
  
  public LinkedHashMap<String, MenuItem> getMenuMap()
  {
    return this.menuMap;
  }
  
  public void setMenuMap(LinkedHashMap<String, MenuItem> menuMap)
  {
    this.menuMap = menuMap;
  }
  
  public Date getLoginTime()
  {
    return this.loginTime;
  }
  
  public void setLoginTime(Date loginTime)
  {
    this.loginTime = loginTime;
  }
  
  public String getEmail()
  {
    return this.email;
  }
  
  public void setEmail(String email)
  {
    this.email = email;
  }
  
  public Date getLastLoginTime()
  {
    return this.lastLoginTime;
  }
  
  public void setLastLoginTime(Date lastLoginTime)
  {
    this.lastLoginTime = lastLoginTime;
  }
  
  public int getFieldId()
  {
    return this.fieldId;
  }
  
  public void setFieldId(int fieldId)
  {
    this.fieldId = fieldId;
  }
  
  public String getFieldName()
  {
    return this.fieldName;
  }
  
  public void setFieldName(String fieldName)
  {
    this.fieldName = fieldName;
  }
  
  public String getEnabled()
  {
    return this.enabled;
  }
  
  public void setEnabled(String enabled)
  {
    this.enabled = enabled;
  }
  
  public String getRolesName()
  {
    return this.rolesName;
  }
  
  public void setRolesName(String rolesName)
  {
    this.rolesName = rolesName;
  }
  
  public String getTrueName()
  {
    return this.trueName;
  }
  
  public void setTrueName(String trueName)
  {
    this.trueName = trueName;
  }
  
  public int getUserid()
  {
    return this.userid;
  }
  
  public void setUserid(int userid)
  {
    this.userid = userid;
  }
  
  public List<Role> getRoleList()
  {
    return this.roleList;
  }
  
  public void setRoleList(List<Role> roleList)
  {
    this.roleList = roleList;
  }
  
  public UserInfo(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities)
  {
    super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
  }
}
